use crate::config::native_version_config::NativeVersionConfig;
use crate::core::entity::resource_url::ResourceUrl;
use crate::core::model::resource_version_entry::ResourceVersionEntry;
use serde::Serialize;

/// 热更新设置
///
/// 热更新设置独立于不同的渠道和不同的母包版本号
#[derive(Serialize, Clone, Debug)]
pub struct NativeVersionSetting {
    pub resource_version: ResourceVersionEntry,
    pub resource_url: ResourceUrl,
}

impl From<NativeVersionConfig> for NativeVersionSetting {
    fn from(value: NativeVersionConfig) -> Self {
        Self {
            resource_version: value.resource_version,
            resource_url: value.resource_url,
        }
    }
}
